package org.goldfish.demo.apicall.analysis.code.upload.model;

import javafx.fxml.FXML;
import javafx.scene.control.Label;
import javafx.scene.control.TextArea;
import lombok.Getter;
import org.springframework.stereotype.Component;

@Component
public class SourceFilePanelController {
    @FXML
    private Label fileNameLabel;
    @FXML
    private TextArea sourceArea;
    @Getter
    @FXML
    private TextArea replyArea;

    public void setSourceFileAnalysis(SourceFileAnalysis sfa) {
        fileNameLabel.setText(sfa.getFile().getName());
        sourceArea.setText(sfa.getContent());
        // 回复区域初始化为空，后续回调更新
        replyArea.clear();
    }

}
